<?php echo $this->Form->create("ObjectCreator"); ?>
<fieldset>RELACIONES DEL OBJETO <?php echo $objeto ?>
    <table border="1">
        <thead>
            <tr>
                <th colspan="2"> BelongsTo</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($objetos as $obj): ?>
            <tr>
                <td><?php echo $obj; ?></td>
                <td><?php echo $this->Form->checkbox("belongsTo.".$obj,array('hiddenField' => false)); ?></td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
 </fieldset>   
    <table border="1">
        <thead>
            <tr>
                <th colspan="2"> hasMany</th>
            </tr>
        </thead>
        <tbody>
            
            <?php foreach ($posiblesObjetos as $obj): ?>
            <tr>
                <td><?php echo $obj;  ?></td>
                <td><?php echo $this->Form->input("ObjectCreator".$obj,array('options' => array('No'=>'No','hasMany'=>'hasMany','hasOne'=>'hasOne'))); ?></td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    
    

    <?php echo $this->Ajax->submit('Guardar', array('url' => array('controller' => 'ObjectCreators', 'action' => 'add',$objeto), 'update' => 'content', 'indicator' => 'loading')); ?>


    <?php echo $this->Ajax->end(); ?>



